<%@ include file="../../../base/include.jsp" %>

<c:if test="${userListCommand.prevPage || userListCommand.nextPage}">
	<div class="pagination pull-right">
		<ul>
			<c:if test='${!userListCommand.prevPage}'>
				<li class="disabled"><a>FIRST</a></li>
				<li class="prev disabled"><a>&larr;</a></li>
			</c:if>
			<c:if test='${userListCommand.prevPage}'>
				<li><a href="<c:url value='/admin/user/list/page/0/${usersFilter}'/>">FIRST</a></li>
				<li class="prev"><a href="<c:url value='/admin/user/list/page/${userListCommand.page - 1}/${usersFilter}'/>">&larr;</a></li>
			</c:if>
				<c:if test="${userListCommand.page - 2 >= 0}">
				<li><a href="<c:url value='/admin/user/list/page/${userListCommand.page - 2}/${usersFilter}' />">${userListCommand.page - 1}</a></li>
			</c:if>
			<c:if test="${userListCommand.page - 1 >= 0}">
				<li><a href="<c:url value='/admin/user/list/page/${userListCommand.page - 1}/${usersFilter}' />">${userListCommand.page}</a></li>
			</c:if>
			<li class="active"><a href="<c:url value='/admin/user/list/page/${userListCommand.page}/${usersFilter}' />">${userListCommand.page + 1}</a></li>
			<c:if test="${userListCommand.page + 1 <= userMaxPage}">
				<li><a href="<c:url value='/admin/user/list/page/${userListCommand.page + 1}/${usersFilter}' />">${userListCommand.page + 2}</a></li>
			</c:if>
			<c:if test="${userListCommand.page + 2 <= userMaxPage}">
				<li><a href="<c:url value='/admin/user/list/page/${userListCommand.page + 2}/${usersFilter}' />">${userListCommand.page + 3}</a></li>
			</c:if>
			
			<c:if test='${!userListCommand.nextPage}'>
				<li class="next disabled"><a>&rarr;</a></li>
				<li class="disabled"><a>LAST</a></li>
			</c:if>
			<c:if test='${userListCommand.nextPage}'>
				<li class="next"><a href="<c:url value='/admin/user/list/page/${userListCommand.page + 1}/${usersFilter}'/>">&rarr;</a></li>
				<li><a href="<c:url value='/admin/user/list/page/${userMaxPage}/${usersFilter}'/>">LAST(${userMaxPage + 1})</a></li>
			</c:if>
		</ul>
	</div>
</c:if>